package com.homework.exception;

import java.util.Scanner;

public class Passport {
	public static void main(String[] args) {
		
		@SuppressWarnings("resource")
		Scanner input = new Scanner(System.in);
		System.out.print("Please input username:");
		String username = input.nextLine();
		System.out.print("Please input passport:");
		String passport = input.nextLine();
		User user = new User();
		user.setUsername(username);
		user.setPassport(passport);
		
		UserService us = new UserService();
		try {
			boolean flag = us.login(user);
			if(flag){
				System.out.println("Successfully login.");
			}
		} catch (LogicException e) {
			e.printStackTrace();
		}
		
	}

}
